-- GENERATED SPELL FOR [Zorbo the Advisor] --


function spell0_18413(pUnit, Event) --@Frost Shock,n/a--
pUnit:FullCastSpellOnTarget(12548,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18413', 8262, 1)
end

function spell1_18413(pUnit, Event) --@Healing Wave,Heal--
pUnit:FullCastSpellOnTarget(11986,pUnit)
pUnit:RegisterEvent('Sorts_18413', 3000, 1)
end

function spell2_18413(pUnit, Event) --@Scorching Totem,Self--
pUnit:FullCastSpellOnTarget(15038,pUnit)
pUnit:RegisterEvent('Sorts_18413', 35264, 1)
end

function Sorts_18413(pUnit, Event)
local choix_sorts_18413 = math.random(0, 2)
if choix_sorts_18413 == 0 then
pUnit:RegisterEvent('spell0_18413', 1, 1)
end
if choix_sorts_18413 == 1 then
pUnit:RegisterEvent('spell1_18413', 1, 1)
end
if choix_sorts_18413 == 2 then
pUnit:RegisterEvent('spell2_18413', 1, 1)
end
end

function mob18413_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18413', math.random(1500, 3000), 1)
end

function mob18413_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18413_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18413_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18413, 1, 'mob18413_Action')
RegisterUnitEvent(18413, 2, 'mob18413_Leave')
RegisterUnitEvent(18413, 3, 'mob18413_Kill')
RegisterUnitEvent(18413, 4, 'mob18413_Die')
